package org.txazo.blog.commons.parse.base;

public class ParserUtil {

	/** 代码段起始标签 */
	public static final String TAG_PREFIX = "<code type=";
	/** 代码段结尾标签 */
	public static final String TAG_SUEFIX = "</code>";
	/** css | html | java | javascript | jsp | python | shell | sql | xml */
	public static final String TAG_TYPE = "^css^html^java^javascript^jsp^python^shell^sql^xml";
	/** css | html | java | javascript | jsp | python | shell | sql | xml */
	public static final String TAG_CODES = "<code type=\"css\"><code type=\"html\"><code type=\"java\"><code type=\"javascript\"><code type=\"jsp\"><code type=\"python\"><code type=\"shell\"><code type=\"sql\"><code type=\"xml\">";

	public static String getCodeType(String code) {
		return code.substring(12, code.indexOf('\"', 12));
	}

}
